<?php
defined('BASEPATH') OR exit('No direct script access allowed');

function getThemes(){
	$path = './theme/';
	$themes = [];
	foreach(scandir($path) as $file){
		if($file!='..' && $file!='.'){
			if(is_dir($path.$file)){
				$param = json_decode(file_get_contents($path.$file.'/config.json'),true);
				$param['path'] = $file;
				$themes[] = $param;
			}
		}
	}
    return $themes;
}

